home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Compute! Gazette 1984 May
/
1984-05.d64
/
mind boggle_64
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-09-20
|
4KB
|
119 lines
100 dimc(4),g(4):poke53281,15
101 so = 54272:for t=so to so+24:poket,0:next:x=0
102 pokeso+24,15:pokeso+5,17:pokeso+6,241
300 print"[147][144]mind boggle":fort=1to 1000:next
340 print"[147]"
350 print "[144] 1 [146] 2 [146] 3 [146] 4 [146] [156] 5 [146] 6 [146][144]"
365 printspc(6)"[144]i am choosing 4 colors now[144]":forl=1to100
366 pokes2,int(rnd(1)*128)+128:for m=1 to 10:nextm:nextl:pokes2,0:gosub4050
400 a$="123456":r=int(rnd(1)*6)+1:a1$=mid$(a$,r,1):a1=val(a1$)
401 r=int(rnd(1)*6)+1:a2$=mid$(a$,r,1):ifa1$=a2$then401
402 a2=val(a2$)
403 r=int(rnd(1)*6)+1:a3$=mid$(a$,r,1):ifa1$=a3$ora2$=a3$then403
404 a3=val(a3$)
405 r=int(rnd(1)*6)+1:a4$=mid$(a$,r,1):ifa1$=a4$ora2$=a4$ora3$=a4$then405
406 a4=val(a4$)
500 for t= 1to 1000:next
510 pokeso,100:pokeso+1,100:pokeso+4,17:forl=1to100:nextl:pokeso+4,16
540 poke214,21:poke211,5:print:print" "
550 x$="":poke214,21:poke211,0:print:input "select colors";x$
600 iflen(x$)<>4thengosub4050:goto3300
700 fore=1to4:v=val(mid$(x$,e,1))
705 ifv<1orv>6thengosub4050:goto3300
710 nexte
900 x=x+1:b=0:w=0:aa$=a1$+a2$+a3$+a4$
901 forj=1to4
902 g(j)=val(mid$(x$,j,1))
903 c(j)=val(mid$(aa$,j,1))
904 ifg(j)=c(j)thenb=b+1:g(j)=0:c(j)=0
905 nextj
906 forj=1to4:ifc(j)=0then912
907 h=0:fork=1to4
908 ifc(j)=0then911
909 ifc(j)<>g(k)then911
910 h=1:g(k)=0:c(j)=0
911 nextk:w=w+h
912 nextj
1000 onxgoto1100,1105,1110,1115,1120,1125,1130,1135,1140,1145
1100 print" 1 ";:goto1200
1105 print" 2 ";:goto1200
1110 print" 3 ";:goto1200
1115 print" 4 ";:goto1200
1120 print" 5 ";:goto1200
1125 print" 6 ";:goto1200
1130 print" 7 ";:goto1200
1135 print" 8 ";:goto1200
1140 print" 9 ";:goto1200
1145 print"10 ";
1200 x1=val(left$(x$,1)):x2=val(mid$(x$,2,1)):x3=val(mid$(x$,3,1))
1210 x4=val(right$(x$,1))
1220 p=0:t=0
1300 p=p+1:onx1goto1700,1701,1702,1703,1704,1705
1400 p=p+1:onx2goto1700,1701,1702,1703,1704,1705
1500 p=p+1:onx3goto1700,1701,1702,1703,1704,1705
1600 p=p+1:onx4goto1700,1701,1702,1703,1704,1705
1700 print"[144] [146] ";:pokeso+1,100:goto1750
1701 print" [146] ";:pokeso+1,124:goto1750
1702 print" [146] ";:pokeso+1,140:goto1750
1703 print" [146] ";:pokeso+1,166:goto1750
1704 print"[156] [146] ";:pokeso+1,150:goto1750
1705 print" [146] ";:pokeso+1,185:goto1750
1750 pokeso+4,17:forl=1to99:nextl:pokeso+4,16:forl=1to250:nextl
1751 onpgoto1400,1500,1600
1761 ontgoto2072,2073,2074,2075
1800 print" ";:ifb=0then2000
1810 gosub3100
1820 onbgoto1900,1901,1902,1903
1900 print"[144][209]";:goto2000
1901 print"[144][209][209]";:goto2000
1902 print"[144][209][209][209]";:goto2000
1903 print"[144][209][209][209][209]";:goto4000
2000 ifw=0then2060
2010 gosub3200
2020 onwgoto2050,2051,2052,2053
2050 print"[144][209][146]":goto2060
2051 print"[144][209][209][146]":goto2060
2052 print"[144][209][209][209][146]":goto2060
2053 print"[144][209][209][209][209][146]"
2060 print"[144]":print" "
2062 print""
2065 ifx<>10then500
2066 pokeso+4,32:forl=1to15:form=200to220+l*2:pokeso+1,m:nextm:nextl
2068 pokeso+4,32
2070 print"":print" ";
2071 t=t+1:ona1goto1700,1701,1702,1703,1704,1705
2072 t=t+1:ona2goto1700,1701,1702,1703,1704,1705
2073 t=t+1:ona3goto1700,1701,1702,1703,1704,1705
2074 t=t+1:ona4goto1700,1701,1702,1703,1704,1705
2075 print" ":print"[144] correct colors press return"
2080 ifpeek(197)<>1then2080
2085 gett$:print"[147]too bad you missed!"
2086 print"10 tries is enough."
2090 pokeso+4,33
2096 forl=1to6:pokeso+1,80:form=1to400:nextm:pokeso+4,32:form=1to400:nextm
2098 nextl:pokeso+4,32
3000 gett$:print"[147][144] want to play again?"
3005 print "yes or no?"
3010 ifpeek(197)=25thengett$:poke198,0:goto101
3012 ifpeek(197)=39then3014
3013 goto3010
3014 gett$:print"[147][144]chicken!!" :print:print:end
3100 pokeso+4,17:forl=100to154:pokeso+1,l:nextl:pokeso+4,16:return
3200 pokeso+4,17:forl=100to48step-1:pokeso+1,l:nextl:pokeso+4,16:return
3300 print"[145]illegal input![145]":forl=1to500:nextl
3301 forl=1to999:nextl:gosub4050:goto500
4000 print:print:print"[144]you w i n !! press return"
4005 pokeso+4,33:form=180to100step-5:pokes2,m:nextm:form=100to200step 5
4006 pokeso+1,m:next m:poke so+4,32
4010 ifpeek(197)<>1then4005
4011 print"[147]";
4015 ifx=1thenprint" lucky guess!":goto4020
4016 ifx=2orx=3thenprint" expert!!!":goto4020
4017 ifx=4orx=5orx=6thenprint" pretty good!":goto4020
4018 ifx=7orx=8thenprint"[156] so so!":goto4020
4019 print" you barely got it!"
4020 pokeso+4,33:forl=1to20:form=148to200step5:pokes2,m:nextm
4021 for m=200to 148step-5:pokeso+1,m:nextm:nextl:pokeso+4,32
4030 goto3000
4050 print" ":return